home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 45
/
Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso
/
Aminet
/
game
/
role
/
ldmud-3.2-bin.lha
/
mud
/
doc
/
efun
/
to_int
< prev
next >
Wrap
Text File
|
2001-04-06
|
680b
|
24 lines
SYNOPSIS
int to_int(string)
int to_int(float)
int to_int(int)
int to_int(closure)
(int)<value>
DESCRIPTION
Floats are truncated to integer values, strings with leadings
digits are converted to integers up to the first non-digit.
lfun-closures are converted into their function index.
Integers are just returned.
Regarding floats, it is important to keep rounding effects
in mind: to_int(3.1*10.0) does not return 31, but instead 30,
because internally the result of the multiplication is 30.999999 .
HISTORY
Introduced in 3.2.1@2
SEE ALSO
to_string(E), sscanf(E)